<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateCommentTable extends Migration
{
    /**
     * Run the migrations.
     *   comment_id  评论id
     *   user_id  用户id
     *   content  评论内容
     *   type     类型(1.资讯2.视频3企业评价)
     *  relation_id 关联的id
     *   photo   评论图片
     * time
     * @return void
     */
    public function up()
    {
        Schema::create('comment', function (Blueprint $table) {
            $table->engine='InnoDB';
            $table->increments('comment_id');
            $table->integer('user_id');
            $table->string('content',200);
            $table->tinyInteger('type');
            $table->integer('relation_id');
            $table->string('photo','100');
            $table->integer('time');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('comment');
    }
}
